﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace equinox_proto{

    class FacturacionForm2Panel : EquinoxPanel 
    {
        private TextBox costoInput;
        private Label costoHoraLabel;
        private TextBox tipoPagoInput;
        private Label tipoPagoLabel;
        private Button botonSiguiente;
        private DataGridView travelingExpensesGrid;
        private DataGridViewTextBoxColumn date;
        private DataGridViewTextBoxColumn from;
        private DataGridViewTextBoxColumn to;
        private DataGridViewTextBoxColumn hours;
        private DataGridViewTextBoxColumn description;
        private DataGridViewTextBoxColumn surveyor;
        private DataGridViewTextBoxColumn expense;
        private Label travelingGridLabel;
        private Label workingGridLabel;
        private DataGridView workingExpensesGrid;
        private Button botonAnterior;
        private FacturacionForm1Panel anterior;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn1;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn2;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn3;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn4;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn5;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn6;
        private DataGridViewTextBoxColumn dataGridViewTextBoxColumn7;
        private Form padre;
        public FacturacionForm1Panel Anterior
        {
            get { return anterior; }
            set { anterior = value; }
        }

    
        public FacturacionForm2Panel(Form padre) : base(padre)
        {
            this.padre = padre;
            InitializeComponent();
        }

        private void InitializeComponent()
        {
            this.costoInput = new System.Windows.Forms.TextBox();
            this.costoHoraLabel = new System.Windows.Forms.Label();
            this.tipoPagoInput = new System.Windows.Forms.TextBox();
            this.tipoPagoLabel = new System.Windows.Forms.Label();
            this.botonSiguiente = new System.Windows.Forms.Button();
            this.botonAnterior = new System.Windows.Forms.Button();
            this.travelingExpensesGrid = new System.Windows.Forms.DataGridView();
            this.date = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.from = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.to = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.hours = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.description = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.surveyor = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.expense = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.travelingGridLabel = new System.Windows.Forms.Label();
            this.workingGridLabel = new System.Windows.Forms.Label();
            this.workingExpensesGrid = new System.Windows.Forms.DataGridView();
            this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
            ((System.ComponentModel.ISupportInitialize)(this.travelingExpensesGrid)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.workingExpensesGrid)).BeginInit();
            this.SuspendLayout();
            int gridSize = padre.Size.Width - 110;
            // 
            // costoInput
            // 
            this.costoInput.Location = new System.Drawing.Point(647, 34);
            this.costoInput.Name = "costoInput";
            this.costoInput.Size = new System.Drawing.Size(107, 22);
            this.costoInput.TabIndex = 11;
            // 
            // costoHoraLabel
            // 
            this.costoHoraLabel.AutoSize = true;
            this.costoHoraLabel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.costoHoraLabel.Location = new System.Drawing.Point(485, 34);
            this.costoHoraLabel.Name = "costoHoraLabel";
            this.costoHoraLabel.Size = new System.Drawing.Size(148, 23);
            this.costoHoraLabel.TabIndex = 10;
            this.costoHoraLabel.Text = "Costo por hora:";
            // 
            // tipoPagoInput
            // 
            this.tipoPagoInput.Location = new System.Drawing.Point(322, 34);
            this.tipoPagoInput.Name = "tipoPagoInput";
            this.tipoPagoInput.Size = new System.Drawing.Size(118, 22);
            this.tipoPagoInput.TabIndex = 9;
            // 
            // tipoPagoLabel
            // 
            this.tipoPagoLabel.AutoSize = true;
            this.tipoPagoLabel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tipoPagoLabel.Location = new System.Drawing.Point(96, 34);
            this.tipoPagoLabel.Name = "tipoPagoLabel";
            this.tipoPagoLabel.Size = new System.Drawing.Size(131, 23);
            this.tipoPagoLabel.TabIndex = 8;
            this.tipoPagoLabel.Text = "Tipo de pago:";
            // 
            // botonSiguiente
            // 
            this.botonSiguiente.Font = new System.Drawing.Font("Arial", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.botonSiguiente.Location = new System.Drawing.Point(489, 653);
            this.botonSiguiente.Name = "botonSiguiente";
            this.botonSiguiente.Size = new System.Drawing.Size(199, 78);
            this.botonSiguiente.TabIndex = 14;
            this.botonSiguiente.Text = "Siguiente";
            this.botonSiguiente.UseVisualStyleBackColor = true;
            this.botonSiguiente.Click += new System.EventHandler(this.botonSiguiente_Click);
            // 
            // botonAnterior
            // 
            this.botonAnterior.Font = new System.Drawing.Font("Arial", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.botonAnterior.Location = new System.Drawing.Point(241, 653);
            this.botonAnterior.Name = "botonAnterior";
            this.botonAnterior.Size = new System.Drawing.Size(199, 78);
            this.botonAnterior.TabIndex = 15;
            this.botonAnterior.Text = "Anterior";
            this.botonAnterior.UseVisualStyleBackColor = true;
            this.botonAnterior.Click += new System.EventHandler(this.botonAnterior_Click);
            // 
            // travelingExpensesGrid
            // 
            this.travelingExpensesGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.travelingExpensesGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.travelingExpensesGrid.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
            this.travelingExpensesGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.travelingExpensesGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.travelingExpensesGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.date,
            this.from,
            this.to,
            this.hours,
            this.description,
            this.surveyor,
            this.expense});
            this.travelingExpensesGrid.Location = new System.Drawing.Point(55, 126);
            this.travelingExpensesGrid.Name = "travelingExpensesGrid";
            this.travelingExpensesGrid.RowTemplate.Height = 24;
            this.travelingExpensesGrid.Size = new System.Drawing.Size(gridSize, 210);
            this.travelingExpensesGrid.TabIndex = 16;
            // 
            // date
            // 
            this.date.HeaderText = "Date";
            this.date.Name = "date";
            // 
            // from
            // 
            this.from.HeaderText = "From";
            this.from.Name = "from";
            // 
            // to
            // 
            this.to.HeaderText = "To";
            this.to.Name = "to";
            // 
            // hours
            // 
            this.hours.HeaderText = "Hours";
            this.hours.Name = "hours";
            // 
            // description
            // 
            this.description.HeaderText = "Description";
            this.description.Name = "description";
            // 
            // surveyor
            // 
            this.surveyor.HeaderText = "Surveyor";
            this.surveyor.Name = "surveyor";
            // 
            // expense
            // 
            this.expense.HeaderText = "Expense";
            this.expense.Name = "expense";
            // 
            // travelingGridLabel
            // 
            this.travelingGridLabel.AutoSize = true;
            this.travelingGridLabel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.travelingGridLabel.Location = new System.Drawing.Point(96, 82);
            this.travelingGridLabel.Name = "travelingGridLabel";
            this.travelingGridLabel.Size = new System.Drawing.Size(94, 23);
            this.travelingGridLabel.TabIndex = 17;
            this.travelingGridLabel.Text = "Traveling:";
            // 
            // workingGridLabel
            // 
            this.workingGridLabel.AutoSize = true;
            this.workingGridLabel.Font = new System.Drawing.Font("Arial", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.workingGridLabel.Location = new System.Drawing.Point(96, 367);
            this.workingGridLabel.Name = "workingGridLabel";
            this.workingGridLabel.Size = new System.Drawing.Size(88, 23);
            this.workingGridLabel.TabIndex = 19;
            this.workingGridLabel.Text = "Working:";
            // 
            // workingExpensesGrid
            // 
            this.workingExpensesGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 
            | System.Windows.Forms.AnchorStyles.Right)));
            this.workingExpensesGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            this.workingExpensesGrid.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
            this.workingExpensesGrid.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.workingExpensesGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
            this.workingExpensesGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
            this.dataGridViewTextBoxColumn1,
            this.dataGridViewTextBoxColumn2,
            this.dataGridViewTextBoxColumn3,
            this.dataGridViewTextBoxColumn4,
            this.dataGridViewTextBoxColumn5,
            this.dataGridViewTextBoxColumn6,
            this.dataGridViewTextBoxColumn7});
            this.workingExpensesGrid.Location = new System.Drawing.Point(55, 402);
            this.workingExpensesGrid.Name = "workingExpensesGrid";
            this.workingExpensesGrid.RowTemplate.Height = 24;
            this.workingExpensesGrid.Size = new System.Drawing.Size(gridSize, 210);
            this.workingExpensesGrid.TabIndex = 18;
            // 
            // dataGridViewTextBoxColumn1
            // 
            this.dataGridViewTextBoxColumn1.HeaderText = "Date";
            this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1";
            // 
            // dataGridViewTextBoxColumn2
            // 
            this.dataGridViewTextBoxColumn2.HeaderText = "From";
            this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2";
            // 
            // dataGridViewTextBoxColumn3
            // 
            this.dataGridViewTextBoxColumn3.HeaderText = "To";
            this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3";
            // 
            // dataGridViewTextBoxColumn4
            // 
            this.dataGridViewTextBoxColumn4.HeaderText = "Hours";
            this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4";
            // 
            // dataGridViewTextBoxColumn5
            // 
            this.dataGridViewTextBoxColumn5.HeaderText = "Description";
            this.dataGridViewTextBoxColumn5.MinimumWidth = 10;
            this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5";
            // 
            // dataGridViewTextBoxColumn6
            // 
            this.dataGridViewTextBoxColumn6.HeaderText = "Surveyor";
            this.dataGridViewTextBoxColumn6.MinimumWidth = 10;
            this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6";
            // 
            // dataGridViewTextBoxColumn7
            // 
            this.dataGridViewTextBoxColumn7.HeaderText = "Expense";
            this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7";
            // 
            // FacturacionForm2Panel
            // 
            this.Controls.Add(this.workingGridLabel);
            this.Controls.Add(this.workingExpensesGrid);
            this.Controls.Add(this.travelingGridLabel);
            this.Controls.Add(this.travelingExpensesGrid);
            this.Controls.Add(this.botonAnterior);
            this.Controls.Add(this.botonSiguiente);
            this.Controls.Add(this.costoInput);
            this.Controls.Add(this.costoHoraLabel);
            this.Controls.Add(this.tipoPagoInput);
            this.Controls.Add(this.tipoPagoLabel);
            this.Name = "FacturacionForm2Panel";
            ((System.ComponentModel.ISupportInitialize)(this.travelingExpensesGrid)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.workingExpensesGrid)).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        private void botonAnterior_Click(object sender, EventArgs e)
        {
            Home home = this.anterior.Padre;
            home.Controls.Remove(this);
            this.anterior.recalculateSize(this.anterior.Padre);
            home.FormPanel = this.anterior;
            home.Controls.Add(home.FormPanel);
        }

        private void botonSiguiente_Click(object sender, EventArgs e)
        {
            PdfGestor.Instance.test();
        }

    }
}
